#ifndef D3DCOLORUTILS_H
#define D3DCOLORUTILS_H

#include "D3DConfiguration.h"

#include <D3dx10math.h>

namespace D3D10Utils
{
    // Converts ARGB 32-bit color format to ABGR 32-bit color format.
    __forceinline unsigned __int32 ARGB2ABGR(const unsigned __int32 argb)
    {
        unsigned __int8 A = (argb >> 24) & 0xff;
        unsigned __int8 R = (argb >> 16) & 0xff;
        unsigned __int8 G = (argb >>  8) & 0xff;
        unsigned __int8 B = (argb >>  0) & 0xff;

        return (A << 24) | (B << 16) | (G << 8) | (R << 0);
    }

    const D3DXCOLOR WHITE(1.0f, 1.0f, 1.0f, 1.0f);
    const D3DXCOLOR BLACK(0.0f, 0.0f, 0.0f, 1.0f);
    const D3DXCOLOR RED(1.0f, 0.0f, 0.0f, 1.0f);
    const D3DXCOLOR GREEN(0.0f, 1.0f, 0.0f, 1.0f);
    const D3DXCOLOR BLUE(0.0f, 0.0f, 1.0f, 1.0f);
    const D3DXCOLOR YELLOW(1.0f, 1.0f, 0.0f, 1.0f);
    const D3DXCOLOR CYAN(0.0f, 1.0f, 1.0f, 1.0f);
    const D3DXCOLOR MAGENTA(1.0f, 0.0f, 1.0f, 1.0f);

    const D3DXCOLOR BEACH_SAND(1.0f, 0.96f, 0.62f, 1.0f);
    const D3DXCOLOR LIGHT_YELLOW_GREEN(0.48f, 0.77f, 0.46f, 1.0f);
    const D3DXCOLOR DARK_YELLOW_GREEN(0.1f, 0.48f, 0.19f, 1.0f);
    const D3DXCOLOR DARKBROWN(0.45f, 0.39f, 0.34f, 1.0f);
}

#endif // D3DCOLORUTILS_H
